package com.ddl.common.enums;

public enum TaskType {

    DISTRIBUTE(0,"派息"),
    DISTRIBUTE_PP(1,"团队收益派息"),
    PERIODIC(2,"定转活"),
    TRANFERMAJORACCOUNT(3,"转账到超级账户")
    ;
    private Integer code;
    private String msg;

    TaskType(Integer code, String msg) {
        this.code=code;
        this.msg=msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    public static TaskType getTaskType(Integer code) {
        for (TaskType t : TaskType.values()) {
            if (code.equals(t.getCode())) {
                return t;
            }
        }
        return null;
    }
}
